Part Number Hot Search : 
1N3336 CHA20 SCL4002B 10ELT MAX14531 CEM4804 150U060D F1060
Product Description
Full Text Search
 

To Download ELM407P Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  elm407 elm electronics ?circuits for the hobbyist www.elmelectronics.com connection diagram pdip and soic (top view) v dd v ss 1 2 3 4 8 7 6 5 rotary decoder - 3 wire 4x interface the elm407 is an 8 pin integrated circuit that is used to convert the output from a rotary encoder into three signals (chip select, clock and up/down) that can be used to control various devices. the low power cmos technology used ensures that only a very small current is required over the entire 2.0 to 5.5 volt operating range. there is no need for external filtering or debounce circuits with the elm407, as this is all performed within the integrated circuit. after debouncing the encoder signals, the elm407 determines the direction of shaft rotation, and then generates the appropriate outputs. a write sequence can also be generated if the write enable input is at a high level when the outputs are generated. the elm407 provides 4x decoding of a rotary encoder signal. if your application requires 2x decoding, please see the elm406 (it is identical to the elm407 in every respect, except that it provides 2x decoding). clk a b description digital audio potentiometer controls variable voltage or temperature circuits positioning controls tuning circuits applications block diagram 1 of 10 low power cmos design wide supply range ?2.0 to 5.5 volts complete debouncing of the encoder inputs no external filtering needed 4x decoding can generate a write sequence startup delay timer high current drive outputs features elm407dsa cs u/d write enable b 7 a debounce circuit 2 cs 5 v dd direction decoding 4 write enable v dd output logic 3 u/d rotary encoder debounce circuit 6 clk
elm407 elm electronics ?circuits for the hobbyist www.elmelectronics.com pin descriptions 2 of 10 all rights reserved. copyright 2011 elm electronics. every effort is made to verify the accuracy of information provided in this document, but no representation or warranty can be given and no liability assumed by elm electronics with respect to the accuracy and/or use of any products or information described in this document. elm electronics will not be responsible for any patent infringements arising from the use of these products or information, and does not authorize or warrant the use of any elm electronics product in life support devices and/or systems. elm electronics reserves the right to make changes to the device(s) described in this document in order to improve reliability, function, or design. v dd (pin 1) this pin is the positive supply pin, and should always be the most positive point in the circuit. internal circuitry connected to this pin is used to provide power on reset of the internal logic, so an external reset signal is not required. refer to the electrical characteristics section for more information. a (pin 2) this input should be connected to what is normally known as the ??signal from a rotary (quadrature) encoder. the signal at this pin should lead (ie change state before) the signal at pin 3 when the device is being moved in a clockwise or up direction. an external pullup resistor is required for the encoder (a typical value is 10 k w ), but no external capacitors are needed (as the internal debounce circuitry provides the filtering). b (pin 3) this input should be connected to what is normally known as the ??signal from a rotary (quadrature) encoder. the signal at this pin should lag behind (ie change state after) the signal at pin 2 when the device is being moved in a clockwise or up direction. an external pullup resistor is required for the encoder (a typical value is 10 k w ), but no external capacitors are needed (as the internal debounce circuitry provides the filtering). write enable (pin 4) this input controls the state of the clk output when the rising edge of the cs output occurs. if pin 4 is high, the clk output will be held high during the cs transition, which generates an eeprom write for many digital potentiometer chips. u/d (pin 5) this ?p/down?output changes with the direction of encoder rotation. for a clockwise movement (the a input appears first, followed by the b), this output will be set high before the cs output (pin 7) is switched low. for counter-clockwise movement, the output will be set low prior to the chip select going low. the u/d output does not change state when the cs and clk pulsing is complete - it remains at the level it was just prior to the cs going low. clk (pin 6) a low ?lock?pulse is output at this pin 200 ?ec after the cs output has gone low. the pulse is normally 400 ?ec wide, and is typically used to cause the controlled device to change state based on the level at the u/d pin. if pin 4 is at a high level, the clk pulse will be reduced in length to 200 ?ec, and the cs pulse width extended to 600 ?ec, so that clk is at a high level while the cs output transitions from the active low level to the quiescent high level. this will cause the setting to be written to memory for many devices. cs (pin 7) this output provides a ?hip select? or enable function. as the rotary encoder shaft rotates, a series of clock pulses are generated at pin 6. just prior to these pulses appearing, the cs output will go low, and stay at that level for 400 ?ec. this changes a little if the write enable input is at a high level. see the output waveforms section (on page 7) for more information. v ss (pin 8) circuit common is connected to this pin. this is the most negative point in the circuit. elm407dsa
ordering information elm electronics ?circuits for the hobbyist www.elmelectronics.com these integrated circuits are only available in either a 300 mil plastic dip format, or in a 150 mil soic surface mount type of package. to order, add the appropriate suffix to the part number: 300 mil plastic dip............................... ELM407P 150 mil soic..................................... elm407sm elm407 3 of 10 elm407dsa outline diagrams the diagrams at the right show the two package styles that the elm407 is available in. the first shows our ELM407P product, which is an elm407 in a 300 mil dip package. this is a standard through hole type dual inline package. the elm407sm is our surface mount version of the elm407. the device package has a 3.90 mm wide body, and is commonly called a 150 mil soic package. the drawings shown here provide the basic dimensions for these ics only. please refer to the following microchip technology inc. documentation for more detailed information: microchip packaging specification , document name en012702.pdf (7.5mb). at the www.microchip.com home page, click on packaging specifications, or go to www.microchip.com/packaging ? pic12f508/509/16f505 data sheet , document 41236e.pdf (1.5 mb). at the www.microchip.com home page, click on data sheets, then search for 12f508. note: all dimensions shown are in mm. ELM407P max 10.92 6.35 elm407sm 3.90 6.00 1.27 2.54
4 of 10 elm407 electrical characteristics absolute maximum ratings storage temperature....................... -65? to +150? ambient temperature with voltage applied.................................. -40? to +85? voltage on v dd with respect to v ss ............ 0 to +6.5v voltage on any other pin with respect to v ss ........................... -0.3v to (v dd + 0.3v) note: stresses beyond those listed here will likely damage this device. these values are given as a design guideline only. the ability to operate to these levels is neither inferred nor recommended. all values are for operation at 25? and a 5v supply, unless otherwise noted. for further information, refer to note 1 below. characteristic minimum typical maximum conditions units supply voltage, v dd 2.0 5.0 5.5 v v dd rate of rise 0.05 v/msec average supply current, i dd 0.6 1.1 ma v dd = 5.0v notes: 1. this integrated circuit is based on a microchip technology inc. pic12f5xx device. for more detailed specifications, please refer to the microchip documentation (www.microchip.com). 2. this spec must be met in order to ensure that a correct power on reset occurs. it is quite easily achieved using most common types of supplies, but may be violated if one uses a slowly varying supply voltage, as may be obtained through direct connection to solar cells, or some charge pump circuits. 3. the internal reset circuitry stops the elm407 from doing anything during this period, so that the power supplies and oscillators have time to stabilize. during this time, all pins behave like inputs. 4. typical only - the actual period varies with the amount of noise present in the input signal. 5. all filtering, delay, and output timing is based on an internal master oscillator. the frequency of this oscillator will vary with voltage and temperature. values shown are typical maximums for 2.0v v dd 5.5v, and temperatures of -40? to +85? output low current (sink) 10 ma ma 5.0 v ol = 0.25v see note 2 elm407dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com debounce period msec 5.5 v dd = 2.0v 0.2 0.3 ma v dd = 5.0v v dd = 3.0v v ol = 0.25v output high current (source) 2.5 ma ma 1.7 v oh = 4.75v v dd = 5.0v v dd = 3.0v v oh = 2.75v see note 4 power on reset time 9 msec see note 3 18 30 msec 50 internal timing variation % 1 4 see note 5 startup time delay
5 of 10 elm407 elm407dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com rotary encoders a rotary encoder (sometimes referred to as a quadrature encoder) is a device that produces digital (on/off) outputs in response to rotary, or circular, motion. it is often constructed such that it looks very much like a potentiometer, or audio volume control (see the picture of a typical device, at the right). as the encoder shaft is turned, internal contacts open and close, creating two waveforms that are ideally separated in phase by 90 degrees (ie ?n quadrature?. actually, you need to provide external ?ullup?resistors and a power supply to create these waveforms, as the contacts themselves can not do this. an ideal waveform from a rotary encoder would look like this: due to the 90 degree phase difference, when one waveform changes, the other is always stable. by noting the direction of the change and the level of the other input at that time, you can determine the direction of motion of the shaft. rotary encoders are not ideal, however. due to their construction, and variations in shaft speed, the waveforms are not perfectly square with the 50% duty cycles shown. figure 2 shows a captured trace from a real rotary encoder that is more representative of what you will typically find. note that the two ?cope channels (1 and 2) represent the encoder outputs a and b, respectively. the ch 1 (a) waveform leads the ch 2 (b) waveform, which usually means that the shaft is turning in a clockwise direction. the first rising edge of the channel 2 waveform shows another problem that occurs with moving mechanical contacts - multiple pulses due to bounce. when two contacts meet, the moving one will tend to bounce, like a ball does when it is dropped on the floor. each bounce results in an electrical connection being made, then broken, which will look like multiple inputs to a fast electronic circuit. various mechanical means are used to reduce the amount of bounce, but it can never really be eliminated. the following section discusses how the elm407 uses electronic means to remove the bounce. figure 2. actual rotary encoder waveform figure 1. quadrature waveforms a b a typical rotary encoder
elm electronics ?circuits for the hobbyist www.elmelectronics.com 6 of 10 elm407dsa elm407 debouncing circuits any time that two metal surfaces meet, as they do inside a rotary encoder, there will be a tendency for the moving one to bounce, which causes the electrical connection to make and break. the duration of this bouncing action may be very short, but it is usually fast enough to cause multiple counts to be recorded by connected electronic circuits. as the number of bounces can not be predicted, a means of removing them is necessary. circuits that remove the bounce are usually called ?ebouncing?circuits. many debouncing circuits employ a simple timer to determine if an input is stable. this generally works well if the two contacts meet and then remain still. with a rotary encoder however, one of the contacts meets the other then usually continues sliding over the surface of the stationary contact. this will produce noise while the contact is sliding, occasionally enough to make it look like there are more inputs. the elm407 employs a two stage system to remove the bounce and the sliding noise from the input signal. a block diagram of the stages are shown in figure 3. the first stage is a digital filter circuit that is used to determine the average value of the waveform over a time. if a long enough time is chosen, short duration pulses will have little effect on the overall average. if the time chosen is too long, however, the circuit will be slow to respond, and may in fact average out some legitimate inputs. choosing the time period (or time constant of the circuit) is thus very important in determining how effective the filtering function will be. we have found that with typical rotary encoder specifications (usually 3.0 msec of bounce or noise, maximum), the elm407 debounce circuit works quite well. after the signal has been filtered, it is compared to some reference levels, and the output of these comparators are used to control a simple timer. the timer is used to ensure that the output of the filter is stable, and not just a momentary transient, while the use of two comparator levels provides hysteresis, so that some variation in the filter output can be tolerated. once the signals from the rotary encoder have been debounced, they may be used by the direction logic circuitry. the following section shows what the elm407 is able to produce from these signals. figure 3. internal debouncing logic tc = 1.7 msec 3 msec timer timer filter rotary encoder input to output logic
7 of 10 elm407dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com elm407 output waveforms once the elm407 has some bounce-free signals to work with, it can generate outputs based on them. the logic to decode the motion of an encoder shaft is not as simple as it would first appear. some authorities recommend simply monitoring an input and when it changes, provide an output based on the level of the other input. this does not always work, as the encoder can output multiple signals from only the ??or or only the ??contact if the shaft is moved ever so slightly when at the detent or at the mid-point position (between detents). simply seeing one input change is not sufficient to say that there is any significant shaft rotation. the elm407 monitors both ??and ??transitions, and determines the outputs based on the sequence in which the transitions have occurred. this is a better way to guarantee that the output signals are generated properly. the internal logic also performs some self- checking, and monitors for problems such as an output pulse being initiated before the previous one had completed, which might occur for some very fast inputs (the second one will be ignored in this case). the output of the elm407 is a series of pulses, as shown in figure 4 (a representative pulse has been enlarged and is shown in figure 5). when the encoder is moving in a clockwise direction, the pulses will be generated with the u/d output at a high level, while a counter-clockwise rotation of the shaft results in pulses generated with the u/d output at a low level. the direction assumes that the encoder is a standard one, where the ??signal leads the ??for a clockwise rotation. figure 6 shows how the output sequence changes when the write enable input (pin 4) is at a high level. in this case, the clk output returns high after only 200 ?ec, and the cs output remains low for an extra figure 4. output signals (pin 4 = 0v) figure 5. up or clockwise output figure 6. up output, with write enabled cs clk u/d 200 ?ec cs clk u/d 400 ?ec this will be low for a counter-clockwise motion a input b input debounce delay direction changes clk cs u/d
8 of 10 elm407dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com elm407 output waveforms (continued) 200 ?ec. this will result in a write of the wiper position to non-volatile memory for many ics (for example, the on semiconductor cat5112, or the intersil x9c102). outputs are usually generated each time that one of the inputs change, so for each full cycle of both of the inputs, there will be 4 output pulses. this is what is known as 4x decoding. the other type of decoder that is very common is the 2x decoder, as used by the elm406. we do not currently offer a product with 1x decoding - if you require one, you will need to use the elm401 and decode the signal with your own logic. output pulses do not always occur when one of the inputs change. after startup, the first output can not be generated until the elm407 has seen both of the inputs change, and no output is generated until then. also, if an input is seen to be ?hattering?the elm407 will block the output. chattering can occur when the shaft is wiggled, or when it is subjected to severe vibration. figure 7 below shows how the elm407 handles the multiple inputs due to chatter. if this logic were not in place, multiple outputs could occur due to vibration (as found in an automobile, or an industrial setting), and the setting could ?reep?with time ?even though the shaft was not turned. generally, output pulses will occur in groups of four (between each detent), so resistance values or settings will repeat consistently as the shaft is rotated in one direction and then in the other. depending on when the shaft changes direction, however, the pulses may not be generated in groups of four. if you are designing a circuit and require that the controlled variable must repeat exactly as the shaft is turned in either direction, you may prefer to use a 2x decoder such as the elm406. figure 7. input chattering change in b (expecting a change in a) causes the elm407 to anticipate a change in direction, and generate a down output a input b input cs clk multiple pulses are ignored while the elm407 waits for a change at the a input the shaft direction changes again a changes, meaning that the shaft is now rotating, and pulses can be output u/d
design considerations 9 of 10 elm407dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com elm407 there are a few details to consider when using the elm407 to interface to a rotary encoder. the first is the fact that the signals available from the encoder are usually only dry contacts closing and opening. you will need to provide pullup resistors for these signals in order to use them in a circuit. the size of the pullup resistor is chosen based on the encoder specifications. the main concern is the maximum current carrying capacity, which sets a lower limit for the pullup resistance. an upper limit for the resistance is set by the minimum current required for contact wetting. if you do not provide enough current through mechanical contacts when they are closed, they will tend to go open with time. a maximum current specification is usually in the range of 1 to 10 ma, while the minimum wetting current would be in the range of 1 ma. this means that with a 5v supply, a pullup resistor of 5 to 10 k w is typically required. the second concern is the use of capacitors on the ??and ??signal lines. many encoder circuits show these as a way to provide some pre-filtering of the signal. that is fine, as long as you realize that the elm407 inputs are cmos and do not have schmitt trigger waveshaping. this means that you should keep the rate of change of the input signal as high as possible to avoid problems (we usually try to maintain at least 1v/?ec). typically, with a 5v supply, a 10 k w pullup, and ttl thresholds, this means capacitor values of no more than about 330 pf, while with a 2.0v supply, the limit would be about 100 pf. one other issue to consider is that during the initial circuit startup, there is a period (of about 20 msec) when the elm407 is being held in a reset state, and the outputs are in a tristate condition. during this time, the outputs will sit at the level they were at before power up (0v) due to stray capacitance having discharged through the protection diodes. since the cs and the clk outputs are active low, this may cause a problem if your controlled circuit is ready too fast. if you require that pins 6 and 7 go to a high level as quickly as possible, you may want to install pullup resistors (of about 10 k w ) on these pins to ensure that the voltage rises quickly to v dd . after the initial 20 msec period, the elm407 sets all pins to their quiescent levels, but does not change any outputs for an additional 50 msec. this ensures that the external circuits have had adequate time to initialize, before being presented with signals to process.
figure 8 below shows how the elm407 might be used with a digital potentiometer (in this case, a dallas semiconductor/maxim ds1804). pullup resistors of 10 k w are used with the rotary encoder to provide voltages for the a and b inputs. power for the elm407 and the ds1804 has been supplied from a common source (it must be between 2.7v and 5.5v for the ds1804), and a small capacitor has been added to ensure that the supply is filtered. the ds1804 data sheet does not recommend any value for the size of this capacitor (0.01 ? is fine for the elm407), but some digital potentiometers do specify a larger capacitor size (typically 0.1 ?). you may need to increase the size of the capacitor, depending on the chip that you use. the elm407 output lines are directly connected to the ds1804 inputs, but we have added two 10 k w example application figure 8. connecting the elm407 to a ds1804 10 of 10 elm407dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com elm407 pullup resistors to ensure that the chip select and the clock lines rise to the v dd level as quickly as possible after power up. this may not be absolutely necessary (as the 3 wire port of the ds1804 is not active for about 50 msec after powerup), but it does not hurt to add it ?other chips may not have such a start up timer. that? about all there is to using the elm406. connect pullup resistors to your rotary encoder, connect the encoder signals to the elm407, then connect the elm407 to the controlled circuit. use a common supply for all the devices, and add a small bypass capacitor across the supply line. the controlled devices can be digital pots, microprocessors, or almost any circuit that will accept cmos signals. enjoy! 0.01? 1 2 3 4 8 7 6 5 v dd v dd v dd 10 k w 10 k w a b rotary encoder c 10 k w ds 1804 1 2 3 4 8 7 6 5 h w l v dd v dd 10 k w


▲Up To Search▲   

 
Price & Availability of ELM407P

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X